package com.test;

/**
 * 静态方法获取单例
 * 
 * @author xuguangqiao
 *1
 *
 *
 */
public class StaticSingleton {

	private StaticSingleton() {
		System.out.println("StaticSingleton is create");
	}

	public static StaticSingleton getInstance() {
		return SingletonHolder.instance;
	}

	private static class SingletonHolder {
		private static StaticSingleton instance = new StaticSingleton();
	}

	public static void main(String[] args) {
		System.out.println(StaticSingleton.getInstance());
	}
}
